package com.lee.crawler.gov.strategy.list;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
public class ListStrategyFactory implements ApplicationContextAware {
	
	private Map<String, ListStrategy> listStrategys = new HashMap<String, ListStrategy>();

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		listStrategys.putAll(applicationContext.getBeansOfType(ListStrategy.class));
	}

	public Map<String, ListStrategy> getListStrategys() {
		return listStrategys;
	}
	
}
